<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="js/jquery-1.12.4.min.js"></script>
  </head>
  <body>
    <input type="text" id="a" />
    <select id="count">
      <option value="0">+</option>
      <option value="1">-</option>
      <option value="2">*</option>
      <option value="3">/</option>
    </select>
    <input type="text" id="b" />
    <input type="button" value="=" id="worth" />
    <input type="text" id="c" />
    <script>
      const $a = $("#a");
      const $b = $("#b");
      const $c = $("#c");
      const $count = $("#count");
      const $worth = $("#worth");

      $worth.click(function () {
        const count = $count.val();
        console.log(count);
        switch (count) {
          case "0":
            $c.val(`${Number($a.val()) + Number($b.val())}`);
            break;
          case "1":
            $c.val(`${Number($a.val()) - Number($b.val())}`);
            break;
          case "2":
            $c.val(`${Number($a.val()) * Number($b.val())}`);
            break;
          case "3":
            $c.val(`${Number($a.val()) / Number($b.val())}`);
            break;
          default:
            break;
        }
      });
    </script>
  </body>
</html>
